function windowBase(){

	/*
	 * Call necessary functions onLoad
	 */
	resizeWindow();
	getMyReports();
	// newReport();
	
	/*
	 * Show / Hide hidden Menu Items
	 */
	//$("#mainMenu").bind("mouseover", function(){
	//	$(".hiddenMenuItem").fadeIn("fast");
	//});
	//$("#mainMenu").bind("mouseleave", function(){
	//	$(".hiddenMenuItem").fadeOut("slow");
	//});
	
	/*
	 * Show / Hide Login Window
	 */
	$("#loginButton").bind("click", function(){
		$("#loginWindow").fadeIn("slow");		
	});
	$("#loginAbort").bind("click", function(){
		$("#loginWindow").fadeOut("fast");		
	});
	 
	/*
	 * Erase Login Credentials on focus
	 */
	$(".loginField").bind("focus", function(){
		this.value = "";		
	});
	
	/*
	 * Validate Login Information
	 */
	$("#loginForm").submit(function() {
      if ($("#loginUsername").val() == "" || $("#loginUsername").val() == " ") {
        alert("Please enter your username!");
        return false;
      }
	   if ($("#loginPassword").val() == "" || $("#loginPassword").val() == " ") {
        alert("Please enter your password!");
        return false;
      }
    });
	
	/*
	 * Logout User (Destroy Session)
	 */
	$("#logoutButton").bind("click", function(){
		self.location.href='logout.php';		
	});
		
	/*
	 * Library
	 */
	$("#menuLibrary").bind("click", function(){
		self.location.href='library.php';
	});
	
	/*
	 * Main Portal
	 */
	$("#userName").bind("click", function(){
		self.location.href='portalMain.php';
	});
	
	/*
	 * reportView
	 */
	$("#reportView").bind("click", function(){
		self.location.href='reportView.php';
	});
	
	$("#newReport").corner();
	$("#newReportEditor").corner();
	$("#newReport").click(function(){
		$("#newReportEditor").slideDown("fast");
		$("#newReport").slideUp("fast");
	});
	
	$("#newReportCancel").click(function(){
		$("#newReport").slideDown("fast");
		$("#newReportEditor").slideUp("fast");
	});
	
	$("#newReportSubmit").click(function(){
		createNewReport();
	});
	
}
function resizeWindow(){
	
	/*
	 * Get Browser Window Data
	 */
	if (window.innerHeight){
		// Standard Browser Height
		var height = window.innerHeight;
	} else {
		// Internet Explorer "standardconform mode" Height
		var height = document.documentElement.clientHeight;
	}
	
	if (window.innerWidth){
		// Standard Browser Height
		var width = window.innerWidth;
	} else {
		// Internet Explorer "standardconform mode" Height
		var width = document.documentElement.clientWidth;
	}
	
	/*
	 * Resize Element mainMenu
	 */
	var menu = document.getElementById("mainMenu");
	menu.style.left = "0";
	menu.style.top = "0";
	menu.style.width = width + "px";
	
	$("#mainMenu").corner("bottom");
	
	/*
	 * Resize ReportList
	 */
	var reportList = document.getElementById("sidebar");
	reportList.style.height = height - 35 + "px";
	
	var myReportsContent = document.getElementById("myReportsContent");
	myReportsContent.style.height = height - 35 + "px";
	
}